package com.tianji.api.client.remark;

import com.tianji.api.client.remark.fallback.RemarkClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Set;

@FeignClient(value = "remark-service", fallbackFactory = RemarkClientFallback.class, path = "likes")
public interface RemarkClient {
    /**
     * 根据业务ID集合查询点赞状态
     *
     * @param bizIds 待检测业务ID集合
     * @return 已点赞的业务ID集合
     */
    @GetMapping("/list")   // localhost:8091/likes/list?ibizIds=1,2,3,4,5
    Set<Long> isLiked(@RequestParam("bizIds") Iterable<Long> bizIds);

}
